package com.ruoyi.service.check.enums;

import lombok.Getter;

/**
 * <p>
 * 作用：区域等级
 * </p>
 *
 * @author Zane
 * @since 2025-10-05 21:15
 */
@Getter
public enum CheckRecordTypeEnum {
  /**
   * 劳务方审批
   */
  COMPANY(1, "项目方审核"),
  /**
   * 项目方审批
   */
  USER(2, "劳务方审核");
  /**
   * 编码
   */
  private final int code;
  /**
   * 描述
   */
  private final String desc;

  CheckRecordTypeEnum(int code, String desc) {
    this.code = code;
    this.desc = desc;
  }

  public boolean eqCode(int code) {
    return this.code == code;
  }

  public static CheckRecordTypeEnum valueOfCode(int code) {
    switch (code) {
      case 1:
        return COMPANY;
      case 2:
        return USER;
      default:
        throw new IllegalArgumentException("code: " + code + "不合法");
    }
  }

}
